const express = require('express')
const router = express.Router()
const auth = require('@/middleware/auth.middleware')
const feedbackController = require('@/controllers/feedback.controller')

/**
 * 反馈列表分页查询
 * @route GET /feedback
 * @summary 反馈列表分页查询
 * @group 反馈管理
 * @param {string} pageNo.query.required
 * @param {string} pageSize.query.required
 * @returns {object} 200
 * @returns {Error}  default - Unexpected error
 * @access feedback-manage-permission:btn:find
 * @security JWT
 */
router.get('/', auth(), feedbackController.findPage)

/**
 * 反馈删除
 * @route DELETE /feedback
 * @summary 反馈删除
 * @group 反馈管理
 * @param {string} id.query.required
 * @returns {object} 200
 * @returns {Error}  default - Unexpected error
 * @access feedback-manage-permission:btn:delete
 * @security JWT
 */
router.delete('/', auth(), feedbackController.deleteById)

module.exports = router
